package com.zxp.cloud.zuul.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zxp
 * @date 2021/8/3 15:24
 */
@RestController
@Slf4j
public class IndexController {

    @Value("${server.port:}")
    private String port;


    @GetMapping("/{id}")
    public String index(@PathVariable("id") String id) {
        //log.debug("接收到请求{},port:{}" ,id,port);
        return id;
    }

    @GetMapping("/hello")
    public String hello() {
        return "hello zuul";
    }


}
